package laos.src;

import java.util.ArrayList;
import java.util.List;

import android.graphics.Color;
import android.graphics.Point;


public class Player {
	
	private Point _loc;
	private ArrayList<Point> _tail;
	private ArrayList<Point> _area;
	private int _pColor;
	private int _tColor;
	private int _aColor;
	
	public Player(){
		_loc = new Point(0, 0);
		_tail = new ArrayList<Point>();
		_area = new ArrayList<Point>();
		_pColor = Color.WHITE;
		_tColor = Color.WHITE;
		_aColor = Color.WHITE;
	}
	
	public Player(int pC, int tC, int aC){
		_loc = new Point(0, 0);
		_tail = new ArrayList<Point>();
		_area = new ArrayList<Point>();
		_pColor = pC;
		_tColor = tC;
		_aColor = aC;
	}
	
	public Player(int x, int y, int pC, int tC, int aC){
		_loc = new Point(x, y);
		_tail = new ArrayList<Point>();
		_area = new ArrayList<Point>();
		_pColor = pC;
		_tColor = tC;
		_aColor = aC;
	}
	
	public void addPointToTail(int x,int y){
		_tail.add(new Point(x,y));
	}
	
	public void addPointToArea(int x,int y){
		_area.add(new Point(x,y));
	}
	
	public void resetTail(){
		_tail.clear();
	}
	
	public void changeLoc(int x, int y){
		_loc.set(x, y);
	}
	
	public void resetPlayer(){
		_loc.set(0, 0);
		_tail.clear();
		_area.clear();
	}
	
	public void resetPlayer(int x, int y){
		_loc.set(x, y);
		_tail.clear();
		_area.clear();
	}
	
	public final List<Point> getTail(){
		return _tail;
	}
	
	public final List<Point> getArea(){
		return _area;
	}
	
	public final Point getLoc(){
		return _loc;
	}
	
	public int getPColor(){
		return _pColor;
	}
	
	public int getTColor(){
		return _tColor;
	}
	
	public int getAColor(){
		return _aColor;
	}
	
	public int getAreaSize(){
		return _area.size();
	}
}
